/**
 *
 */
package com.ybkj.daijia.server.model;

import java.math.BigDecimal;
import java.util.LinkedList;
import java.util.List;

/**
 * @author bo
 *
 */
public class ChartYear extends Base {

    /**
     *
     */
    private static final long serialVersionUID = -1768698884416041970L;

    private Integer year;

    private Long companyId; // 关联子公司ID

    private String companyName; // 关联子公司名称

    private long totalSuccessNum;// 总成交单量

    private long totalCancelNum;// 总销单单量

    private BigDecimal totalPrice;// 总价

    private List<ChartMonth> months;

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public long getTotalSuccessNum() {
        return totalSuccessNum;
    }

    public void setTotalSuccessNum(long totalSuccessNum) {
        this.totalSuccessNum = totalSuccessNum;
    }

    public long getTotalCancelNum() {
        return totalCancelNum;
    }

    public void setTotalCancelNum(long totalCancelNum) {
        this.totalCancelNum = totalCancelNum;
    }

    public BigDecimal getTotalPrice() {
        if (null == totalPrice) {
            return BigDecimal.ZERO;
        }
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public List<ChartMonth> getMonths() {
        return months == null ? new LinkedList<ChartMonth>() : months;
    }

    public void setMonths(List<ChartMonth> months) {
        this.months = months;
    }

}
